home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
ab20
/
ab20_archive
/
utilities
/
emulators
/
apple2emul.lzh
/
Samp.disk
/
MUSYS DOCUMENTATION.txt
< prev
next >
Wrap
Text File
|
1991-04-18
|
10KB
|
399 lines
MUSYS DOCUMENTATION
Musys, written by Rich Skrenta
Quick summary and instructions
I wrote Musys to experiment with multitasking on the Apple.
It was never intended to be especially useful, but rather to
look, from the surface, something like a "big system." Please
keep this in mind while reading this. I am writing this because
a few people have expressed interest in Musys, and some of its
nicest features need some explanation.
First, here are some important terms which I used and what
they mean in the Musys evironment:
STATUS Level or importance of job. 1 is an operator, 2 a
wheel, below 10 is privileged, below 50 is logged
in, and above 60 is not logged in.
PRIORITY How often a job executes. In other words, how
fast it goes. 1 is fastest, 10 is very slow, 0 is
slowest.
RUNSTATUS Condition of job:
128 is a safe job. Left alone by system.
64 is a batch job. Killed when there is no more
input or output.
32 is not logged in. Killed after 2 minutes.
16 is being logged out. Killed after output
buffer is empty (logout message sent) or 2
minutes.
USERID Up to six letters describing user of a job.
MUSYS DOCUMENTATION
First of all, you might want to get into the system and see
what I am talking about. Brunning MULOAD puts Musys in the
language card and gives you 18 jobs max. Brunning MUSYS gives
you 8 jobs max.
After you Brun in, nothing will appear to happen except a
short line will appear. That is the cursor. You can hit return
or ctrl-c to start. It will print a short login message, saying
what job you are, and give you the "@" prompt. (you can change
it). This is the exec level, from which most commands are
typed.
Now, a word about jobs. Musys has real jobs. It doesn't
just make it look like they're there, they really are. 8 pages
of memory are allocated for each job, 5 of which are used (the
other 3 are wasted, but it doesn't matter). Each job has an
input device, an input buffer, an output device, and an output
buffer. Every MUSYS cycle (once through the big loop) Musys
will check the input device for data. If there is some, it
pushes it onto the input buffer (all buffers are fifo, by the
way). It also looks for something in the out buffer, and sends
it to the output device, if it can.
Now, for my device list. These are the devices available:
1 SYSTEM CONSOLE
Fancy name for combination of keyboard & screen.
2 PRINTER (slot 1)
3 D.C. HAYES MICROMODEM (slot 2)
...
MUSYS DOCUMENTATION
...
(now, the hard part)
16-31 PSEUDO-TERMINALS
Well, almost. Devices 16-31 are 256 byte fifo
buffers which can be used just like devices.
Stuff output to them goes in, and input comes
out. They are very useful.
About the parser: I wrote a nice parser for Musys. The
first feature is that you don't have to type the whole command,
only the first unique letters. For example, there are the
commands TEST and TIME. If you typed T return, you get an
ambiguous command error. But you can type TE to start tester,
or TI to read or set the time. Simple, huh? By the way, you
can type the whole command, if you want.
Second feature: the ? option.
Typing a ? in gives you the options for a particular level. For
example, typing just ? return gives you all the exec commands.
Typing DO ? return gives you the options for the DO command.
Got it?
Oh, one more thing. Commands and options can be seperated by
any of the following:
(space) "(),./:;=<>
so, any of the following would do the same thing.
DATE 6/6/67
DAT "06/06/67"
DATE 6,6, 67
DAT (6..;6;;=67)>
MUSYS DOCUMENTATION
Isn't that nice?
A word about control characters. Musys recognizes the
following controls:
C two control c's bring you back to the exec
immediately, one at the next input.
H delete
L clear screen & retype line
O suspend/restore output
Q undo a ctrl-s
R retype line
S put job on hold until ctrl-c or ctrl-q
T print out job information
Finally, the commands. I wrote a lot of commands for Musys.
Most of them, however, just do things to the system itself. No
practical application, you see.
Anyway, the Most Important Command:
SYSTAT Tells you all about all of the jobs currently
running. Gives the devices (input,output), the userid, name of
the program it is currently in, etc.
Next command:
DO /OUTPUT:
/PRIORITY:
/STATUS:
The DO command is for batch jobs. When you type DO return, it
will open a pseudo-terminal and tell you. Then you can type in
commands to the # prompt, and they will to into the fifo device.
When you are satisfied, hit ctrl-z, and if there are no
problems, Musys will make a job whose INPUT device is the pseudo
terminal you just put commands into.
MUSYS DOCUMENTATION
POSSIBLE ERRORS: NO FREE PSEUDO-TERMINALS
NO FREE JOB SLOTS
BUFFER OVERFLOW
The output option allows you to send the job output somewhere
(normally, it goes to device 0, the null device). Example:
DO O 2
would send the do jobs output to the printer.
Remember, some commands require a special status, such as
operator, to do. I will briefly explain a few more commands.
The rest should be self explanatory.
KTIME is the clock constant. Fiddling with this make make the
time a bit more accurate.
HALT puts you in the monitor to make changes. You can restart,
with all of your jobs intact, by typing ctrl-y return.
PICKUP picks up the modem. Someone should then be able to log
in on the modem with a few ctrl-c's, but you may have to
type pickup a few times at first.
HANGUP hangs up the modem
TIME read or set time
DATE read or set date
DAYTIME read time and date.
LOGIN (userid) logs in a wheel, priority 1 with the indicated
usreid.
TERMINAL HALF half duplex
FULL full duplex
OPERATOR secret passwords make job an operator
job. (oh well, the pass is "stick")
MUSYS DOCUMENTATION
Why all the protection junk, you ask? Well, about the most
use I've found for my program is "terminal wars". In this game,
formerly playable only on big systems at a great risk, you try
to become an operator and blow your opponent's jobs away. Well,
now the lowly Apple owner can have fun, too and blow away all
the jobs he wants to.
And just to make it sneakier, there is a strange trapdoor in
the system. If you type ctrl-shift-n, you instantly become job
3, an operator, and are completely safe from attacks. People on
the modem cant do this.
Not very useful, but it can be a lot of fun. The first 3
days, at least. GOOD LUCK!!
Special thanks to Tom Markson, the only other person who really
knows what it can do.